# def hen():
#     h=72
#     print("欢迎来到黑马程序员！")
#     print(f"请出示您的健康码以及{h}")
# print(hen())

# def sum(x, y):
#     result=x+y
#     return result
# a=sum(1,2)
# print(a)

money=5000000
name=""
def num1():
     print(f'{name},您好，您的余额剩余:{money}')
     return Z()
def num2():
    global money
    t = int(input("请输入你要存款的金额:"))
    money+=t
    print(f"{name}，您好，您存款{t}元成功\t")
    print(f"{name}，您好，您的余额:{money}元\t")
    return Z()
def num3():
    global money
    t=int(input("请输入你要取款的金额:"))
    money-=t
    if(money<t):
        print("没那么多钱")
    else:
        print(f"{name}，您好，您取款{t}元成功\t")
        print(f"{name}，您好，您的余额:{money}元\t")
    return Z()
def num4():
    return Z()
def Z():
    while True:
       print("查询余额  [输入1]\t")
       print("存款     [输入2]\t")
       print("取款     [输入3]\t")
       print("退出     [输入4]\t")

       x = int(input("请选择操作: "))

       if x==1:
          num1()
       elif x==2:
          num2()
       elif x==3:
          num3()
       else:
           print("程序自动退出")
       break
if __name__ == "__main__":
    name = input("请输入您的姓名: ")
    Z()